package OddMuse;

=head1 NAME

OddMuse::Database::PageData - Perl Module for saving additional page data

=head1 DESCRIPTION

This module includes the functionality of Fletcher T. Penney's creationtdate
OddMuse module.  This is mostly a re-implementation of the same.

=cut

$VERSION = ( q$Revision: 42 $ ) =~ /(\d+)/g;

=head1 SYNOPSIS

This module stores additional information about a page when it is first created:

    created = the date the page is FIRST saved
    originalAuthor = the username that first created a page

=head1 FUNCTIONS

=over 4

=item * CreationDateOpenPage

This function appends to the OddMuse OpenPage function to add it's data.

=cut

*CreationDateOldOpenPage = *OpenPage;
*OpenPage                = CreationDateOpenPage;

use strict;

sub CreationDateOpenPage {
    CreationDateOldOpenPage( @_ );
    $Page{ created } = $Now unless $Page{ created } or $Page{ revision };
    $Page{ originalAuthor } = GetParam( 'username', '' )
      unless $Page{ originalAuthor }
      or $Page{ revision };
}

1;

__END__

=back

=back

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to C<cmauch@gmail.com>

=head1 AUTHOR

Charles Mauch <cmauch@gmail.com>
Fletcher T. Penney <fletcher@freeshell.org>

=head1 LICENSE

Copyright (c) 2006 Charles Mauch
Copyright (c) 2005 Fletcher T. Penney

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

=head1 SEE ALSO

perl(1).

=cut

# $Id: PageData.pm 42 2006-10-01 05:02:06Z cmauch $
